import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'KdHome',
    redirect: '/home',
    component: () => import('@/views/kd-home.vue'),
    children: [
      {
        path: 'home',
        component: () => import('@/pages/page-home.vue')
      },
      {
        path: 'feed',
        component: () => import('@/pages/page-feed.vue')
      },
      {
        path: 'works',
        component: () => import('@/pages/page-works.vue')
      },
      {
        path: 'best_more',
        component: () => import('@/pages/page-bestMore.vue'),
        // children: [
        //   {
        //     path:'/best_more/:type',
        //     component:()=>import('@/components/comp-tuijian-works.vue')
        //   },
        //   {
        //     path:'best_more/:type',
        //     component:()=>import('@/components/comp-jingxuan-works.vue')
        //   }
        // ]
      },
      {
        path: '/artist',
        component: () => import('@/pages/page-author.vue')
      },
      {
        path: '/user',
        component: () => import('@/pages/page-author-detail.vue')
      }
      ,
      {
        path: '/work/view',
        name: 'workDetail',
        component: () => import('@/pages/page-works-detail.vue')

      },
      {
        path: '/search/index_new',
        component: () => import('@/pages/page-search.vue'),

      },
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/kd-login.vue'),
    children: [
      {
        path: 'l1/:name',
        component: () => import('@/pages/page-login.vue'),
      },
      {
        path: 'l2/:call',
        component: () => import('@/pages/page-register.vue')
      }
    ]
  },





]

const router = new VueRouter({
  routes
})

export default router
